package otw.action;

import java.util.Collections;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import otw.action.base.BaseAction;
import otw.dao.ibatis.UserDao;
import otw.dao.ibatis.UserDaoImpl;

@Controller
@RequestMapping("/user")
public class UserAction extends BaseAction {
	@Autowired
	private UserDao userDao = new UserDaoImpl();

	@RequestMapping("/countAll.do")
	public String countAll(ModelMap mav) {
		int count = userDao.countByMap(Collections.emptyMap());
		mav.addAttribute("count", count);
		return "userCount";
	}
}
